package com.example.demo.controller;

import com.example.demo.service.Impl.UserConfigDataValuesImpl;
import kong.unirest.Unirest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import io.swagger.annotations.*;

/**
 * @date: 2021/9/18 17:00
 * @author: Hello
 */
@Api(tags = "hello")
@RestController
public class HelloController {

    @Autowired
    private UserConfigDataValuesImpl userConfigDataValues;

    @ApiOperation(value = "user config values")
    @RequestMapping("/values")
    public String values() {
        return userConfigDataValues.hobbies.toString();
    }


    @ApiOperation(value = "request")
    @RequestMapping("/request")
    public String request() {
        return Unirest.get("http://localhost:7675/api/index").asString().getBody();
    }
}
